package com.ap.autobase.services.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ap.autobase.domain.User;
import com.ap.autobase.repository.UserDao;
import com.ap.autobase.services.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;
	
	public List<User> getUsers(){
		return userDao.getAll();		
	}

	public User getUserById(Integer id) {
		return userDao.getById(id);
	}

	public User getUserByLoginAndPassword(String username, String password) {
		return userDao.getUserWithLoginAndPassword(username, password);
	}

	
	public void logout(Integer userId) {
		

	}

	@Override
	public List<User> getAll() {
	
		return null;
	}

}
